import numpy as np  
import matplotlib.pyplot as plt  
  
def sigmoid_left(x, c=0, k=5):  
    return 1 / (1 + np.exp(+k * (x - c)))  
  
# 生成x值  
x = np.linspace(-10, 10, 1000)  
  
# 使用不同的c和k值绘制平滑阶跃函数  
plt.figure(figsize=(10, 6))  
  
for c in [-5, 0, 5]:  
    for k in [1, 5, 10]:  
        y = sigmoid_left(x, c, k)  
        label = f"c={c}, k={k}"  
        plt.plot(x, y, label=label)  
  
plt.legend()  
plt.title("Smoothed Step Functions")  
plt.xlabel("x")  
plt.ylabel("f(x)")  
plt.grid(True)  
plt.show()